$OpenBSD: patch-makefile,v 1.3 2017/05/28 11:49:39 ajacoutot Exp $
Index: makefile
--- makefile.orig
+++ makefile
@@ -36,12 +36,12 @@ export BRAZIL_BUILD
 
 checkstyle::
 #   Run checkstyle script
-	$(BGO_SPACE)/Tools/src/checkstyle.sh
+#	$(BGO_SPACE)/Tools/src/checkstyle.sh
 
 coverage:: build-linux
 	$(BGO_SPACE)/Tools/src/coverage.sh github.com/aws/amazon-ssm-agent/agent/...
 
-build:: build-linux build-freebsd build-windows build-linux-386 build-windows-386
+build:: build-linux build-freebsd build-openbsd build-windows build-linux-386 build-openbsd-386 build-windows-386
 
 prepack:: cpy-plugins prepack-linux prepack-linux-386 prepack-windows prepack-windows-386
 
@@ -121,6 +121,14 @@ build-freebsd: checkstyle copy-src pre-build
 	GOOS=freebsd GOARCH=amd64 $(GO_BUILD) -ldflags "-s -w" -o $(BGO_SPACE)/bin/freebsd_amd64/ssm-cli -v \
             $(BGO_SPACE)/agent/cli-main/cli-main.go
 
+.PHONY: build-openbsd
+build-openbsd: checkstyle copy-src pre-build
+	@echo "Build for openbsd agent"
+	GOOS=openbsd GOARCH=amd64 go build -ldflags "-s -w" -o $(BGO_SPACE)/bin/openbsd_amd64/amazon-ssm-agent -v \
+	$(BGO_SPACE)/agent/agent.go $(BGO_SPACE)/agent/agent_unix.go $(BGO_SPACE)/agent/agent_parser.go
+	GOOS=openbsd GOARCH=amd64 $(GO_BUILD) -ldflags "-s -w" -o $(BGO_SPACE)/bin/openbsd_amd64/ssm-cli -v \
+            $(BGO_SPACE)/agent/cli-main/cli-main.go
+
 .PHONY: build-darwin
 build-darwin: checkstyle copy-src pre-build
 	@echo "Rebuild for darwin agent"
@@ -150,6 +158,14 @@ build-linux-386: checkstyle copy-src pre-build
 	$(BGO_SPACE)/agent/update/updater/updater.go $(BGO_SPACE)/agent/update/updater/updater_unix.go
 	GOOS=linux GOARCH=386 $(GO_BUILD) -ldflags "-s -w" -o $(BGO_SPACE)/bin/linux_386/ssm-cli -v \
         $(BGO_SPACE)/agent/cli-main/cli-main.go
+
+.PHONY: build-openbsd-386
+build-openbsd-386: checkstyle copy-src pre-build
+	@echo "Build for openbsd agent"
+	GOOS=openbsd GOARCH=386 go build -ldflags "-s -w" -o $(BGO_SPACE)/bin/openbsd_386/amazon-ssm-agent -v \
+	$(BGO_SPACE)/agent/agent.go $(BGO_SPACE)/agent/agent_unix.go $(BGO_SPACE)/agent/agent_parser.go
+	GOOS=openbsd GOARCH=386 $(GO_BUILD) -ldflags "-s -w" -o $(BGO_SPACE)/bin/openbsd_386/ssm-cli -v \
+            $(BGO_SPACE)/agent/cli-main/cli-main.go
 
 .PHONY: build-darwin-386
 build-darwin-386: checkstyle copy-src pre-build
